let mongoose = require('mongoose')

mongoose.set('useNewUrlParser', true)
mongoose.set('useFindAndModify', false)
mongoose.set('useCreateIndex', true)

mongoose.connect('mongodb://localhost/playground',{ useUnifiedTopology: true,  useNewUrlParser: true })
	.then(value=> {
		console.log('数据库连接成功')
	}).catch(err=> {
		console.log('数据库连接错误')
	})